package com.bingxue.edu.management.education.model.resp.exam;

import com.bingxue.edu.management.education.model.entity.exam.ExamRecord;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.mybatisflex.annotation.RelationManyToOne;
import com.mybatisflex.annotation.TableRef;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;
import java.util.Map;

/**
 * 包含考试记录及对应班级信息
 *
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "考试记录聚合返回信息")
@TableRef(ExamRecord.class)
public class ExamRecordAggregateResp extends ExamRecordResp {

    @Schema(description = "学生姓名")
    private String studentName;

    @Schema(description = "班级名称")
    private String className;

    @Schema(description = "教师id")
    private String leadTeacherId;

    @RelationManyToOne(selfField = "leadTeacherId", targetTable = "base_employee", targetField = "id", valueField = "name")
    @Schema(description = "主讲老师名称")
    private String leadTeacherName;

    @JsonIgnore
    @Schema(description = "题目得分记录")
    private List<ScoreItem> scoreItemList;

    @Schema(description = "题目得分记录Map")
    private Map<String, ScoreItem> scoreItemMap;
}
